package com.xtx.mapper;

import com.xtx.entity.SpecsValues;
import com.xtx.vo.SkuNameVo;
import com.xtx.vo.SpecsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SpecsMapper {
    @Select("select id,name from specs where detailId = #{id}")
    List<SpecsVo> getSpecsById(Integer goodsDetailId);

    @Select("select id,name,`desc`,picture from specs_values where specsId = #{id}")
    List<SpecsValues> getSpecsValuesById(Integer id);

    @Select("select id,name from specs where specsId = #{id}")
    List<SkuNameVo> getSpecsNameById(String id);


    String getSpecsValuesNameById(Integer id, String valueId1, String valueId2);
}
